import { createRouter } from "./utils";
import type { RoutesType } from "./utils";
import { ROUTER_PATH } from "./path";

export const routes: RoutesType[] = [
    {
        path: ROUTER_PATH.__PACKAGE_RELEASE,
        isNeedLogin: true
    },
    {
        path: ROUTER_PATH.__SUBPACKAGE_HEALTH_CONSULT,
        isNeedLogin: true
    },
    {
        path: ROUTER_PATH.__SUBPACKAGE_ACCOUNT_SETTING_INDEX,
        isNeedLogin: true
    },
    {
        path: ROUTER_PATH.__SUBPACKAGE_ACCOUNT_SETTING_ACCOUNT,
        isNeedLogin: true
    },
    {
        path: ROUTER_PATH.__SUBPACKAGE_ACCOUNT_FANS_INDEX,
        isNeedLogin: true
    }
];

const router = {
    PATH: ROUTER_PATH,
    routes,
    install() {
        createRouter({
            routes
        });
    }
};

export * from "./utils";

export * from "./path";

export default router;
